﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using Digitalmes.Model;

namespace Digitalmes.Model.ProductionManagement
{
    /// <summary>
    /// ProductionInbound
    /// </summary>
	[Table("ProductionInbounds")]

    [Display(Name = "_Model.ProductionInbound")]
    public class ProductionInbound : TopBasePoco,IPersistPoco,ITenant
    {
        [Key]
        [Display(Name = "_Model._ProductionInbound._ID")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public new long ID { get; set; }

        [Display(Name = "_Model._ProductionInbound._LineId")]
        [Comment("产线")]
        public long? LineId { get; set; }
        [Display(Name = "_Model._ProductionInbound._LineCode")]
        [Comment("产线编码")]
        public string LineCode { get; set; }
        [Display(Name = "_Model._ProductionInbound._OpId")]
        [Comment("工位")]
        public long? OpId { get; set; }
        [Display(Name = "_Model._ProductionInbound._OpCode")]
        [Comment("工位号")]
        public string OpCode { get; set; }
        [Display(Name = "_Model._ProductionInbound._ProductId")]
        [Comment("产品")]
        public long? ProductId { get; set; }
        [Display(Name = "_Model._ProductionInbound._ProductCode")]
        [Comment("产品编号")]
        public string ProductCode { get; set; }
        [Display(Name = "_Model._ProductionInbound._Sn")]
        [Comment("追溯码")]
        public string Sn { get; set; }
        [Display(Name = "_Model._ProductionInbound._Wo")]
        [Comment("工单")]
        public string Wo { get; set; }
        [Display(Name = "_Model._ProductionInbound._Rfid")]
        [Comment("Rfid")]
        public string Rfid { get; set; }
        [Display(Name = "_Model._ProductionInbound._Ver")]
        [Comment("版本")]
        public long? Ver { get; set; }
       
        [Display(Name = "_Model._ProductionInbound._InboundTime")]
        [Comment("进站时间")]
        public DateTime? InboundTime { get; set; }
        [Display(Name = "_Model._ProductionInbound._InboundStatus")]
        [Comment("进站状态")]
        public SnStatusEnum? InboundStatus { get; set; }


        



        [Display(Name = "_Model._ProductionInbound._IsValid")]
        [Comment("是否有效")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public bool IsValid { get; set; } = true;
        [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
        public string TenantCode { get; set; }

	}

}
